<template>
  <div>
      <el-button type="primary" @click="openMessage">消息提示</el-button>
  </div>
</template>

<script>
export default {
    name:"Message",
    methods:{
        openMessage(){
            this.$message({
                type:"success",
                message:"成功的消息",
                duration:1000,
                onClose:(messageObj)=>{
                    // alert("消息框关闭联")
                    console.log(messageObj);
                }
            })
        }
    }

}
</script>

<style>

</style>